﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace PYNET.Models
{
    public class Comment
    {
        //评论ID
        [Key]
        public int CId { get; set; }
        /// <summary>
        /// 评论者ID
        /// </summary>
        [Required]
        public int UId { get; set; }
        /// <summary>
        /// 评论者名字
        /// </summary>
        [Required]
        public string UName { get; set; }
        /// <summary>
        /// 评论文章Id
        /// </summary>
        [Required]
        public int AId { get; set; }
        /// <summary>
        /// 类型，0为一级 ，1为二级, 2为三级
        /// </summary>
        [Required]
        public int Type { get; set; }
        /// <summary>
        /// 评论的对象
        /// </summary>
        [Required]
        public int TargetId { get; set; }
        /// <summary>
        /// 评论的名字
        /// </summary>
        [Required]
        public string TargetName { get; set; }
        /// <summary>
        /// 内容
        /// </summary>
        [Required]
        public string Content { get; set; }
        /// <summary>
        /// 点赞数
        /// </summary>
        public int LikeNumber { get; set; }
        /// <summary>
        /// 是否已经点赞
        /// </summary>
        public int Liked { get; set; }
    }
}
